/*
* @Author: ludynice
* @Date:   2017-09-18 00:39:35
* @Last Modified by:   ludynice
* @Last Modified time: 2017-10-01 00:57:51
*/
'use strict';

var _main = require('util/main.js');

var _user = {
    //登录
    login : function(userInfo, resolve, reject){
        _main.request({
            url : _main.getServerUrl('/user/login.do'),
            data : userInfo,
            method : 'post',
            success : resolve,
            error : reject
        });
    },
    //检查登录状态
    checkLogin : function(resolve, reject){
        _main.request({
            url : _main.getServerUrl('/user/get_user_info.do'),
            method : 'post',
            success : resolve,
            error : reject
        });
    },
    logou : function(resolve, reject){
        _main.request({
            url : _main.getServerUrl('/user/logout.do'),
            method : 'post',
            success : resolve,
            error : reject
        });
    }
};
module.exports = _user;